package com.lifa.service.impl;

import com.lifa.dao.HuiYuanDao;
import com.lifa.entity.Huiyuan;
import com.lifa.service.HuiYuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class  HuiYuanServiceimpl implements HuiYuanService {

    @Autowired
    private HuiYuanDao huiYuanDao;

    /**
     * 模糊查询
     * @return
     */
    public long mohchax1( String huiyuan_Name) {
        return huiYuanDao.mohcahx(huiyuan_Name);
    }

    /**
     * 分页，模糊查询
     * @param offset
     * @param limit
     * @return
     */
    public List<Huiyuan> fenyemohchax1(String huiyuan_Name, int offset, int limit) {
        return huiYuanDao.fenyemohchax(huiyuan_Name,offset,limit);
    }

    @Override
    public int tianjia1(Huiyuan huiyuan) {
        return huiYuanDao.tianjia(huiyuan);
    }

    /**
     * 查询
     * @return
     */
    public List<Huiyuan> chax() {
        return huiYuanDao.chax();
    }

    @Override
    public int xgai(Huiyuan huiyuan) {
        return huiYuanDao.xgai(huiyuan);
    }

    @Override
    public Huiyuan xgaiid(int huiyuan_Id) {
        return huiYuanDao.xgaiid(huiyuan_Id);
    }

    @Override
    public int jifenxgai1(Huiyuan huiyuan) {
        return huiYuanDao.jifexgai(huiyuan);
    }

    @Override
    public int xiugaijine(int huiyuan_Jifen,int huiyuan_Id) {
        return huiYuanDao.xiugaijine(huiyuan_Jifen,huiyuan_Id);
    }

    @Override
    public int sc1(int huiyuan_Id) {
        return huiYuanDao.sc(huiyuan_Id);
    }
}
